<%--
  Created by IntelliJ IDEA.
  User: yjc
  Date: 2020/11/9
  Time: 17:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script type="text/javascript" src="/jquery/jquery-3.2.1.js"></script>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <script type="text/javascript" src="/layui/layui.js"></script>

</head>
<body>
<table id="catTable"></table>
<script type="text/javascript">
    layui.use(["table"],function () {
         var table=layui.table;

        //表格数据渲染{code:0,count,data:[]}
             table.render({
            elem: '#catTable',
            url:'listCat',
            cols:[[
                {field:'id',title:'编号',width:'150px'},
                {field:'name',title:'名称',width:'200px'},
                {field:'status',title:'状态',width:'150px'},
                {field:'parentId',title:'父结点',width:'100px'}
            ]]
        });
    })
</script>
</body>
</html>
